package main

import (
	"fmt"
	v2 "test_demo/reptile/v2"
)

func main() {
	// http://m.mamicode.com

	var seed []v2.Request
	seed = []v2.Request{
		{
			Url:"http://m.mamicode.com",
			//Url:"http://www.zhenai.com/zhenghun/beijing",
			Parse:v2.NewFuncParser(v2.ParseList,"ParseList"),
		},
	}

	e := v2.SimpleEngine{}
	e.Run(seed...)

	//TestT()

	fmt.Println("task done")
}

func TestT() {
	t := &T1{name:"C"}
	t.Cfunc()

	t2 := &T2{name:"V",age:12}
	t2.Cfunc()

	var t3 T
	t3 = &T2{name:"F",age:12}
	t3.Cfunc()
}

type T interface {
	Cfunc()
}

type T1 struct {
	name string
}

func (t *T1) Cfunc() {
	fmt.Println("name",t.name)
}


type T2 struct {
	name string
	age int
}

func (t *T2) Cfunc() {
	fmt.Println("name",t.name,"age",t.age)
}

